package com.feihong.txgw.inter.contract.pay;

import com.feihong.txgw.json.pay.JiFenParser;
import com.feihong.txgw.ui.mvp.model.IBaseModel;
import com.feihong.txgw.ui.mvp.precenter.AbBasePrecenter;
import com.feihong.txgw.ui.mvp.view.IBaseView;

import io.reactivex.Observable;

/**
 * @Author wangziheng
 * @ProjectName txgw_app
 * @ClassName IPayContract
 * @package com.feihong.txgw.inter.contract.pay
 * @data 2018/5/4 18:28
 * @Describe
 * @Change
 */
public interface IPayContract {
    interface IPayMainView extends IBaseView{

        void loadOrderJiFenResult(JiFenParser jiFenInfo);

        void loadOrderJiFenError();

        void createWechatPayOrderResult(String result);

        void createWechatPayOrderError();

    }

    interface IPayMainModel extends IBaseModel{

        Observable<JiFenParser> getOrderJiFenInfo(String orderSn,String orderType);

        /**
         *
         * @param orderID
         * @param price
         * @param orderName
         * @param handle_notify
         * @param use_point
         * @param payType
         * @return
         */
        Observable<String> createWechatPayOrder(String orderID,String price,String handle_notify,String use_point,String payType,String orderName);
    }

    abstract class AbPayMainPrecenter extends AbBasePrecenter<IPayMainModel,IPayMainView>{
        public abstract void loadOrderJiFenInfo(String orderSn,String orderType);

        public abstract void createWechatPayOrder(String orderID,String price,String orderName,String handle_notify,String use_point,String payType);
    }
}
